package myannotion.springmvc.aspect;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;

/**
 * @author sss
 * @date 2020-02-23 09:58
 **/
@Aspect
public class AspectTest {

	@Pointcut("execution(* myannotion.springmvc.controller..*.*(..))")
	public void poincutaa(){

	}

	@Before("poincutaa()")
	public void before(){
		System.out.println("执行了 前置通知方法*******");
	}
	@Around("poincutaa()")
	public Object around(ProceedingJoinPoint pjp) throws Throwable {
		Object proceed = pjp.proceed();
		System.out.println("执行了 环绕通知方法*******");
		return proceed;
	}


	@After("poincutaa()")
	public void after(){
		System.out.println("执行了 后置置通知方法*******");
	}
}
